Functional Design: Principles, Patterns, and Practices